Interprocedural Shape Analysis for Recursive Programs
نویسندگان
چکیده
A shape-analysis algorithm statically analyzes a program to determine information about the heap-allocated data structures that the program manipulates. The results can be used to optimize, understand, debug, or verify programs. Existing algorithms are quite imprecise in the presence of recursive procedure calls. This is unfortunate, since recursion provides a natural way to manipulate linked data structures. We present a novel technique for shape analysis of recursive programs. An algorithm based on our technique has been implemented. It handles programs manipulating linked lists written in a subset of C. The algorithm is signi cantly more precise than existing algorithms. For example, it can verify the absence of memory leaks in many recursive programs; this is beyond the capabilities of existing algorithms.
منابع مشابه
Interprocedural Shape Analysis for Cutpoint-Free Programs
We present a framework for interprocedural shape analysis, which is contextand flow-sensitive with the ability to perform destructive pointer updates. We limit our attention to cutpoint-free programs—programs in which reasoning on a procedure call only requires consideration of context reachable from the actual parameters. For such programs, we show that our framework is able to perform an effi...
متن کاملInterprocedural Analysis of Concurrent Programs Under a Context Bound
Analysis of recursive programs in the presence of concurrency and shared memory is undecidable. A common approach is to remove the recursive nature of the program while dealing with concurrency. A different approach is to bound the number of context switches, which has been shown to be very useful for program analysis. In previous work, Qadeer and Rehof [36] showed that contextbounded analysis ...
متن کاملCall-Site Heuristics for Scalable Context- Sensitive Interprocedural Analysis
When analyzing a program via an abstract interpretation (dataflow analysis) framework we would like to examine the program in a context-sensitive interprocedural manner. Analyzing the entire program in a manner that precisely considers interprocedural flow can lead to much more accurate results than local or context insensitive analyses (particularly for heap based analyses such as shape analys...
متن کاملInterprocedural Compilation of Fortran D (extended Version) Interprocedural Compilation of Fortran D
Fortran D is a version of Fortran extended with data decomposition speciications. It is designed to provide a machine-independent programming model for data-parallel applications and has heavily innuenced the design of High Performance Fortran (HPF). In previous work we described Fortran D compilation algorithms for individual procedures. This paper presents an interprocedural approach to analy...
متن کاملEnforcing Termination of Interprocedural Analysis
Interprocedural analysis by means of partial tabulation of summary functions may not terminate when the same procedure is analyzed for infinitely many abstract calling contexts or when the abstract domain has infinite strictly ascending chains. As a remedy, we present a novel local solver for general abstract equation systems, be they monotonic or not, and prove that this solver fails to termin...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001